<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/views/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/views/include/nocachehead.jsp"%>
<%@ include file="/views/include/statusbar.jsp"%>
<title>${spotInfo.name}</title>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/payattention.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/pagination.js"></script>

<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/comment.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.raty.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/stringutil.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/base.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/feed.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/shortMessage.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/notification.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/video.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/ratyStar.js"></script>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/spot.css" />
</head>
<script type="text/javascript">
function ajaxVote(containerId,objId, star) {
	jQuery.ajax({
		url : "/skyline/spot/vote.html",
		type : "POST",
		data : "spotId=" + objId + "&star=" + star,
		dataType:"json",
		contentType : "application/x-www-form-urlencoded; charset=utf-8",
		success : function(msg) {
			var obj=msg;
			//alert(obj.SpotStar);
			$(containerId).raty.start(obj.SpotStar,'#'+containerId.id);
			if(obj.Raty_Tag)
			{
			alert("你已经评价过了");
			}
		}
	});
}
function AjaxstarInit(containerId,objId,startStar)
{
$(containerId).raty({
start: startStar,
click: function(score) {
			ajaxVote(containerId,objId,score);

		}	
});
}
$(document).ready(function(){
	
	if(${scope}==0){
		$('.countryTag').hide();
		$('.provinceTag').hide();
		$('.cityTag').hide();
		<c:set var="listUrl" value="${pageContext.request.contextPath}/spot/list.html"></c:set>
	//	alert("${listUrl}");
	}
	if(${scope}==1){
		$('.provinceTag').hide();
		$('.cityTag').hide();
		<c:set var="listUrl" value="${pageContext.request.contextPath}/spot/country/${spotList[0].siteId}/list.html"></c:set>
	//	alert("${listUrl}");
	}
	if(${scope}==2){
		$('.cityTag').hide();
		<c:set var="listUrl" value="${pageContext.request.contextPath}/spot/province/${spotList[0].siteId}/list.html"></c:set>
	//	alert("${listUrl}");
	}
	if(${scope}==3){
		<c:set var="listUrl" value="${pageContext.request.contextPath}/spot/city/${spotList[0].siteId}/list.html"></c:set>
	//	alert("${listUrl}");
	}
//	$('#myStar').starLevel();
//	AjaxstarInit(spotStar,${spotInfo.id},${spotInfo.star});
	//alert($('#content').html().length);
	//showDepart();
});
</script>

<body>
	<br>
	<br>

	<div class="">
		<c:forEach items="${refrenceList}" var="ref">
			<div class="spotView">
				<div class="portraitView">
					<a
						href="${pageContext.request.contextPath}/spot/ref/${ref.spotId}/${ref.id}.html">
						<img title="${ref.refrenceTitle}" width="100px" height="100px"
						src="${spotPortraitPath }/${ref.refrenceportrait}" />
					</a>
				</div>
				<div class="spotInfoView">
					<p>标题：${ref.refrenceTitle }</p>
					<p>摘要：${ref.refrenceDigest }</p>
					<p>投递人信息：</p>
					<p>${ref.providerNikename }</p>
				</div>
			</div>
			<br>
		</c:forEach>
		</div>
		<div class="pageView">
				<skyline:page
					url="${pageContext.request.contextPath}/spot/ref/${refrenceList[0].spotId }/${refrenceList[0].refrenceType }/list.html"
					page="${requestScope.page}" maxSize="2" />
	</div>
</body>
</html>